﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EmbeddedSensorCloud.Plugin.MicroERP
{
    public enum DBType
    {
        Fake,
        MySQL
    }

    public static class DAOFactory
    {
        public static ICustomerDAO CreateCustomerDAO(DBType dbType, string connectionString)
        {
            switch (dbType)
            {
                case DBType.Fake:
                    return null;
                case DBType.MySQL:
                    return new MySQLCustomerDAO(connectionString);
            }
            return null;
        }

        public static IInvoiceDAO CreateInvoiceDAO(DBType dbType, string connectionString)
        {
            switch (dbType)
            {
                case DBType.Fake:
                    return null;
                case DBType.MySQL:
                    return new MySQLInvoiceDAO(connectionString);
            }
            return null;
        }
    }
}
